
#ifndef RS232INTERFACE_H
#define RS232INTERFACE_H

//-----------------------------------------------------------------//

BOOL OpenPort();
BOOL OpenPort(int nPortNo, int baud);
BOOL SendPortOrder(BYTE* pBuf, int nLength);
int WritePortData(BYTE *pBuf, int nLength);
int ReadPortData(BYTE *pBuf, int nLength);
BOOL ClosePort();

#endif


BOOL WriteComm(HANDLE hComm, OVERLAPPED* pOL, void* pBuf, DWORD dwByteToWrite);
DWORD ReadComm(HANDLE hComm, OVERLAPPED* pOL, unsigned char* pBuf, DWORD dwByteToRead);
BOOL SetBand(int nBand);
void Reset();

int InitGPRS();
BOOL ConnectedServer();
BOOL SendSelect(char* strSQL);

extern char host[16];

